﻿package com.kuanter.kuanterauto.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.kuanter.kuanterauto.R;
import com.kuanter.kuanterauto.baseui.BaseActivity_NoBar;
import com.umeng.analytics.MobclickAgent;

public class SettingServiceActivity  extends BaseActivity_NoBar{

	private View rl_service_jihuo = null;
	private View rl_service_chongzhi = null;
	private View rl_service_shuaka = null;
	private View rl_service_guashi = null;
	private View rl_service_wangdian = null;
	private View rl_service_huiyuan = null;
	private View rl_setting_fuwu = null;
	private Button btTopLeft_service=null;
	
	public void onResume() {
	    super.onResume();
	    MobclickAgent.onResume(this);
	}
	public void onPause() {
	    super.onPause();
	    MobclickAgent.onPause(this);
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.setting_service);
		
		initView();
		initListener();
	}
	
	private void initView(){
		rl_service_jihuo=(View) findViewById(R.id.rl_service_jihuo);
		rl_service_jihuo.setBackgroundResource(R.drawable.item_top_selector);
		rl_service_chongzhi=(View) findViewById(R.id.rl_service_chongzhi);
		rl_service_chongzhi.setBackgroundResource(R.drawable.item_middle_selector);
		rl_service_shuaka=(View) findViewById(R.id.rl_service_shuaka);
		rl_service_shuaka.setBackgroundResource(R.drawable.item_middle_selector);
		rl_service_guashi=(View) findViewById(R.id.rl_service_guashi);
		rl_service_guashi.setBackgroundResource(R.drawable.item_bottom_selector);
		rl_service_wangdian=(View) findViewById(R.id.rl_service_wangdian);
		rl_service_wangdian.setBackgroundResource(R.drawable.item_top_selector);
		rl_service_huiyuan=(View) findViewById(R.id.rl_service_huiyuan);
		rl_service_huiyuan.setBackgroundResource(R.drawable.item_middle_selector);
		rl_setting_fuwu=(View) findViewById(R.id.rl_setting_fuwu);
		rl_setting_fuwu.setBackgroundResource(R.drawable.item_bottom_selector);
		btTopLeft_service=(Button) findViewById(R.id.btTopLeft_service);
	}
	
	private void initListener(){
		rl_service_jihuo.setOnClickListener(this);
		rl_service_chongzhi.setOnClickListener(this);
		rl_service_shuaka.setOnClickListener(this);
		rl_service_guashi.setOnClickListener(this);
		rl_service_wangdian.setOnClickListener(this);
		rl_service_huiyuan.setOnClickListener(this);
		rl_setting_fuwu.setOnClickListener(this);
		btTopLeft_service.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch(v.getId()){
		case R.id.rl_service_jihuo:
			qStartActivity(SettingServiceJihuoActivity.class, null,"setting");
			break;
		case R.id.rl_service_chongzhi:
			qStartActivity(SettingServiceChongzhiActivity.class, null);
			break;
		case R.id.rl_service_shuaka:
			qStartActivity(SettingServiceShuakaActivity.class, null);
			break;
		case R.id.rl_service_guashi:
			qStartActivity(SettingServiceGuashiActivity.class, null);
			break;
		case R.id.rl_service_wangdian:
			qStartActivity(SettingServiceWangdianActivity.class, null);
			break;
		case R.id.rl_service_huiyuan:
			qStartActivity(SettingServiceHuiyuanActivity.class, null);
			break;
		case R.id.rl_setting_fuwu:
			qStartActivity(SettingServiceFuwuActivity.class, null);
			break;
		case R.id.btTopLeft_service:
			finish();
			break;
		}
	}
	
}
